f(x)=|x-1|+……+|x-1000|

来源:百度知道 编辑:UC知道 时间:2024/05/27 15:48:53
f(x)=|x-1|+|x-2|……+|x-1000|
定义域为[1,1000]
求函数的值域,并指出x在最值处的取值

最小值在x=500时取得
f(x)=|x-1|+|x-2|……+|x-1000|=
|x-1|+|x-2|……+|x-500|+|501-x|+|502-x|……+|1000-x|
>=|(x-1)+(x-2)……+(x-500)+(501-x)+(502-x)……+(1000-x)|
=500*500=250000
此时x在[500,501]间取任意值

最大值在x=1或者x=1000的时候取得
此时f(x)=0+1+2+3+...+999=1000*999/2=499500

函数的值域为[250000, 4995000]

最小值在x=500时取得
f(x)=|x-1|+|x-2|……+|x-1000|=
|x-1|+|x-2|……+|x-500|+|501-x|+|502-x|……+|1000-x|
>=|(x-1)+(x-2)……+(x-500)+(501-x)+(502-x)……+(1000-x)|
=500*500=250000
此时x在[500,501]间取任意值
无最大值
因为
x趋于无穷,f(x)趋于无穷
故f(x)值域为[250000,inf)